package com.ddd.infrastructure.config.listener;

import javax.servlet.ServletRequest;
import javax.servlet.ServletRequestEvent;
import javax.servlet.ServletRequestListener;
import javax.servlet.annotation.WebListener;

//请求监听
@WebListener
public class ServletRequestListenerDemo  implements ServletRequestListener {
    @Override
    public void requestDestroyed(ServletRequestEvent sre) {
        ServletRequest servletRequest = sre.getServletRequest();
        System.out.println("ServletRequestListenerDemo监听器初始化。。。。。。。。。。。。");
    }

    @Override
    public void requestInitialized(ServletRequestEvent sre) {
        System.out.println("ServletRequestListenerDemo监听器销毁。。。。。。。。。。。");
    }
}
